TicTacToe đơn giản trong JavaScript với mã nguồn
5.375 lượt xem;
- TicTacToe.html
- project /
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8" />
5 <title>Tic Tac Toe</title>
6
7 <link type="text/css" rel="stylesheet" href="Styles/Style.css" />
8 <script src='https://kit.fontawesome.com/a076d05399.js'></script>
9 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
10 </head>
11 <body>
12
13 <div class="container">
14 <div id="menuBar" style="text-align:right; padding-top:20px">
15 <button id="btnReset"><i class="fa fa-refresh" title="Restart the game." style="font-size: 30px;color: maroon"></i></button>
16
17 </div>
18 <div id="divOption" class="option">
19 <label>Tic Tac Toe</label><br /><br /><br/>
20 <label id="msg" style="font-size:20px;color:red"></label>
21 <!--<input type="radio" name="avatar"><i class="fa fa-heart" style="font-size:50px;color:red">
22 <input type="radio" name="avatar"><i class="fa fa-music" style="font-size:50px;color:goldenrod"></i>-->
23 </div>
24 <div id="dvTable" class="divTable">
25 <table id="mainTable">
26 <tr>
27 <td id="C0" class="cell"></td>
28 <td id="C1" class="cell"></td>
29 <td id="C2" class="cell"></td>
30 </tr>
31 <tr>
32 <td id="C3" class="cell"></td>
33 <td id="C4" class="cell"></td>
34 <td id="C5" class="cell"></td>
35 </tr>
36 <tr>
37 <td id="C6" class="cell"></td>
38 <td id="C7" class="cell"></td>
39 <td id="C8" class="cell"></td>
40 </tr>
41 </table>
42
43 </div>
44 </div>
45
46 <script type="text/javascript" src="Scripts/Controllers.js"></script>
47 <script type="text/javascript" src="Scripts/TicTacToe.js"></script>
48 </body>
49 </html>
2 <html>
3 <head>
4 <meta charset="utf-8" />
5 <title>Tic Tac Toe</title>
6
7 <link type="text/css" rel="stylesheet" href="Styles/Style.css" />
8 <script src='https://kit.fontawesome.com/a076d05399.js'></script>
9 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
10 </head>
11 <body>
12
13 <div class="container">
14 <div id="menuBar" style="text-align:right; padding-top:20px">
15 <button id="btnReset"><i class="fa fa-refresh" title="Restart the game." style="font-size: 30px;color: maroon"></i></button>
16
17 </div>
18 <div id="divOption" class="option">
19 <label>Tic Tac Toe</label><br /><br /><br/>
20 <label id="msg" style="font-size:20px;color:red"></label>
21 <!--<input type="radio" name="avatar"><i class="fa fa-heart" style="font-size:50px;color:red">
22 <input type="radio" name="avatar"><i class="fa fa-music" style="font-size:50px;color:goldenrod"></i>-->
23 </div>
24 <div id="dvTable" class="divTable">
25 <table id="mainTable">
26 <tr>
27 <td id="C0" class="cell"></td>
28 <td id="C1" class="cell"></td>
29 <td id="C2" class="cell"></td>
30 </tr>
31 <tr>
32 <td id="C3" class="cell"></td>
33 <td id="C4" class="cell"></td>
34 <td id="C5" class="cell"></td>
35 </tr>
36 <tr>
37 <td id="C6" class="cell"></td>
38 <td id="C7" class="cell"></td>
39 <td id="C8" class="cell"></td>
40 </tr>
41 </table>
42
43 </div>
44 </div>
45
46 <script type="text/javascript" src="Scripts/Controllers.js"></script>
47 <script type="text/javascript" src="Scripts/TicTacToe.js"></script>
48 </body>
49 </html>